﻿<UserControl x:Class="Kiosk.UserControls.MapPresenter"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="542" Width="453" Loaded="UserControl_Loaded">
    
    <UserControl.Resources>
        <Storyboard x:Key="sbPathAnimation" AutoReverse="True"  RepeatBehavior="Forever" Duration="0:0:0.5">
            <ColorAnimation AutoReverse="True" From="Green" To="White" Storyboard.TargetName="startColor2" Storyboard.TargetProperty="Color" />
            <ColorAnimation AutoReverse="True" From="Red" To="White" Storyboard.TargetName="endColor2" Storyboard.TargetProperty="Color" />
        </Storyboard>
        <Storyboard x:Key="RipplePoints"  RepeatBehavior="Forever" Duration="0:0:1.5">
            <DoubleAnimation From="1" To="0" Storyboard.TargetName="pthCircleEnd" Storyboard.TargetProperty="Opacity" />
            <DoubleAnimation From="10" To="25" Storyboard.TargetName="endRipple" Storyboard.TargetProperty="RadiusX" />
            <DoubleAnimation From="10" To="25" Storyboard.TargetName="endRipple" Storyboard.TargetProperty="RadiusY" />
            <DoubleAnimation From="1" To="0" Storyboard.TargetName="pthCircleStart" Storyboard.TargetProperty="Opacity" />
            <DoubleAnimation From="10" To="25" Storyboard.TargetName="startRipple" Storyboard.TargetProperty="RadiusX" />
            <DoubleAnimation From="10" To="25" Storyboard.TargetName="startRipple" Storyboard.TargetProperty="RadiusY" />

        </Storyboard>

    </UserControl.Resources>
    <Viewbox Stretch="Uniform" StretchDirection="Both">
        <Canvas Name="mapCanvas" Height="453" Width="542" >
            <Canvas.Background>
                <ImageBrush ImageSource="images/styledMAP.png" Stretch="None" />    
            </Canvas.Background>
            <!-- Start Paths -->
            <Path Name="pthStart">
                <Path.Fill>
                	<RadialGradientBrush>
                		<GradientStop x:Name="startColor1" Color="#FFA6DE8E" Offset="0"/>
                		<GradientStop x:Name="startColor2" Color="#FF1B7E02" Offset="1"/>
                	</RadialGradientBrush>
                </Path.Fill>
                <Path.Data>
                    <EllipseGeometry x:Name="ellStartPoint" Center="20,20" RadiusX="10" RadiusY="10" />
                </Path.Data>
            </Path>
            <Path  Name="pthStartBorder" RenderTransformOrigin=".5,.5" Fill="White" Stroke="Black" StrokeThickness="2" />
            <Path  Name="pthStartText" RenderTransformOrigin=".5,.5" Fill="Black"  />
            <Path  Name="pthCircleStart" RenderTransformOrigin=".5,.5" Stroke="LimeGreen" StrokeThickness="3" Fill="Transparent">
                <Path.Data>
                    <EllipseGeometry x:Name="startRipple" Center="80,80" RadiusX="10" RadiusY="10"  >
                    </EllipseGeometry>
                </Path.Data>
            </Path>






            <!--End Paths-->
            <Path Name="pthEnd">
                <Path.Fill>
                	<RadialGradientBrush>
                		<GradientStop x:Name="endColor1" Color="#FFF5A8A8" Offset="0"/>
                		<GradientStop x:Name="endColor2" Color="#FFFF0000" Offset="1"/>
                	</RadialGradientBrush>
                </Path.Fill>

                <Path.Data>
                    <EllipseGeometry x:Name="ellEndPoint" Center="80,80" RadiusX="10" RadiusY="10"  />
                </Path.Data>
            </Path>
            <Path  Name="pthEndBorder" RenderTransformOrigin=".5,.5" Fill="White" Stroke="Black" StrokeThickness="2" />
            <Path  Name="pthEndText" RenderTransformOrigin=".5,.5" Fill="Black" />
            <Path  Name="pthCircleEnd" RenderTransformOrigin=".5,.5" Stroke="Red" StrokeThickness="3" Fill="Transparent">
                <Path.Data>
                    <EllipseGeometry x:Name="endRipple" Center="80,80" RadiusX="10" RadiusY="10"  >
                    </EllipseGeometry>
                </Path.Data>
            </Path>


        </Canvas>
    </Viewbox>
</UserControl>
